class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
 http_basic_authenticate_with name: CONFIG[:username],password: CONFIG[:password]
  #http_basic_authenticate_with name: "username",password: "password~"
  #http basic 认证
=begin
  before_filter :verify_access
  def verify_access
      authenticate_or_request_with_http_basic("Documents Realm") do |username, password|
        username == "username" && password == "password~"
      end
  end
=end
end
